import {API_TAG_ALL_LIST, API_TAG_COUNT, API_TAG_LIST} from "~/constant/api";
import {Page} from "~/entity/page";
import {Tag} from "~/entity/tag";

export default new class tag {
    /**
     * 获取标签列表
     */
    getList = (page?: Page, tag?: Tag) => {
        return useUtils().HttpUtils.get(API_TAG_LIST, {
            ...tag,
            ...page,
        });
    }

    /**
     * 获取标签列表
     */
    getAll = (tag?: Tag) => {
        return useUtils().HttpUtils.get(API_TAG_ALL_LIST, {
            ...tag,
        });
    }

    /**
     * 获取标签数量
     */
    getCount = () => {
        return useUtils().HttpUtils.get(API_TAG_COUNT);
    }
};